//
//  KSChecklogisticsCallTableViewCell.swift
//  Supermarket
//
//  Created by Black_Crystal on 2017/9/27.
//  Copyright © 2017年 kushao. All rights reserved.
//

import UIKit

class KSChecklogisticsCallTableViewCell: UITableViewCell {

    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        let callbtn = UIButton()
        callbtn.setTitle("联系商家", for: .normal)
        callbtn.setImage(UIImage.init(named: "Home_phone.jpg"), for: .normal)
        callbtn.imageEdgeInsets = UIEdgeInsets.init(top: 10, left: 10, bottom: 10, right: 13)
        callbtn.setTitleColor(KSColor.kColor_3, for: .normal)
        callbtn.addTarget(self, action: #selector(callPhoneEvent), for: .touchDown)
        self.contentView.addSubview(callbtn)
        callbtn.snp.makeConstraints { (make) in
            make.edges.equalTo(UIEdgeInsets.init(top: 0, left: 0, bottom: 0, right: 0))
        }
    }
    
    
    @objc func callPhoneEvent() {
        KSTools.telephone(phone: "17602156149")
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    required init(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
